home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-c.dk!news
- From: Frank Nielsen <frank.nielsen@ntsrv.capacity.dk>
- Newsgroups: comp.lang.c++
- Subject: Re: Random numbers in C++
- Date: Tue, 23 Jan 1996 10:07:34 -0800
- Organization: CapaCity
- Message-ID: <310523E6.624C@ntsrv.capacity.dk>
- References: <4e07ge$me7@server1.ctc.com>
- NNTP-Posting-Host: pc51.capacity.dk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I; 16bit)
-
- Richard Kemp wrote:
- >
- > Hi!!
- >
- > How do you make a random number in C++. I'm not familiar with C, so if it's a C
- > function that will help a lot also. Thanks!!
- >
- > --
- > Richard Kemp
-
-
- Hey Richard.
-
- First call "C" function randomize(); at startup.
-
- Then every time you need a random number you call random(<max random
- number>).
-